package february.test_2_28;

import java.util.Scanner;

public class TestMain2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int count = 0;
        for(int i = 2; i <= n; i++) {
            if(isOk(i)) {
                count++;
            }
        }
        System.out.println(count);
    }
    public static Boolean isOk(int n) {
        int[] arr = new int[n];
        for(int i = 2; i < n/2; i++) {
            if(n % i == 0) {
                if(arr[i] == 0 && arr[n/i] == 0) {
                    arr[i]++;
                    arr[n/i]++;
                }
            }
        }
        int tmp = n;
        for(int i = 0; i < n; i++) {
            if(arr[i] == 1) {
                tmp -= i;
            }
        }
        return tmp == 1;
    }
}
